# coding=utf-8
import pip
from subprocess import call

'''
用于升级python的扩展包一次性升级所有另外提供命令行方式
pip install pip-review
pip-review --local --interactive

环境迁移
pip freeze > requirements.txt

pip uninstall -ry requirements.txt

pip install -r requirements.txt
'''
for dist in pip.get_installed_distributions():
    call("pip3 install --upgrade " + dist.project_name, shell=True)

